<div id="myDialog" style="display:none">
<form method="post" name="" action="" id="dialog">
<table align="center">
<tr>
    <td><label class="required" for="name">部门名称:</label></td>
    <td><input type="text" value="" id="name" name="name" maxlength="30"></td>
</tr>
<tr>
    <td><label class="required" for="master">负责人：</label></td>
    <td><input type="text" value="" id="master" name="master" maxlength="32"></td>
</tr>
<tr>
    <td><label class="required" for="intro">部门介绍：</label></td>
    <td><textarea rows="7" cols="35" id="intro" name="intro" ></textarea></td>
</tr>
</table>
</form>
</div>

<div id="content-bar" >
    <button onclick="Department.data.add();" class="ui-icon-plusthick">添加部门</button>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab-1" id="list">
    <tr>
        <th width="20">ID</th>
        <th width="100">部门名称</th>
        <th width="120">负责人</th>
        <th width="120">部门介绍</th>
        <th width="40">管理</th>
    </tr>
    <tr id="template" class="hide">
        <td name="department_id">#department_id#</td>
        <td name="name">#name#</td>
        <td name="master">#master#</td>
        <td name="intro">#intro#</td>
        <td>
            <button onclick="Department.data.edit(#department_id#, this);" title="编辑" class="ui-icon-pencil"></button>
            <button onclick="Department.data.del(#department_id#, this);" title="删除" class="ui-icon-trash"></button>
        </td>
    </tr>
    <?php foreach ($this->departmentList as $department):?>
    <tr>
        <td name="department_id"><?=$department->getDepartmentId()?></td>
        <td name="name"><?=$department->getName()?></td>
        <td name="master"><?=$department->getMaster()?></td>
        <td name="intro"><?=$department->getIntro()?></td>
        <td>
            <button onclick="Department.data.edit(<?=$department->getDepartmentId()?>, this);" title="编辑" class="ui-icon-pencil"></button>
            <button onclick="Department.data.del(<?=$department->getDepartmentId()?>, this);" title="删除" class="ui-icon-trash"></button>
        </td>
    </tr>
    <?php endforeach;?>
    <tfoot><tr><td colspan="5"><?php echo $this->paginationControl($this->paginator, 'Sliding', 'page.phtml', array ('params' => $this->params ) ); ?></td></tr></tfoot>
</table>
<div class="paginator">

</div>